<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ tag language="java" pageEncoding="UTF-8" %>
<%@ attribute name="id" required="true" %>
<a href="javascript:void(0)"
   onclick="deleteEntity('deleteEntity','${id}')"
   class="btn btn-danger ">删除</a>

<script>
    function deleteEntity(url, id) {
        $.post(url, {"id": id}, function (rs) {
            if (rs == "") {
                window.location.reload();
            } else {
                alert(rs);
            }
        })
    }
</script>